<template>
  <div id="app">
    <!-- <router-view> -->
    <div id="nav" v-show="navFlag">
      <router-link to="/">
        <van-icon name="home-o" size="0.7rem" />
        <div>首页</div></router-link
      >
      <router-link to="/classify">
        <van-icon name="coupon-o" size="0.7rem" />
        <div>分类</div></router-link
      >
      <router-link to="/shoppingcart">
        <van-icon name="cart-o" size="0.7rem" />
        <div>购物车</div>
      </router-link>

      <router-link to="/mine">
        <van-icon name="manager-o" size="0.7rem" />
        <div>我的</div>
      </router-link>
    </div>
    <router-view />
  </div>
</template>

<style>
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
  /* padding-top: 20px; */
}

.appnavbox {
  overflow: hidden;
}
#nav {
  z-index: 99;
  padding: 10px 20px 10px 20px;
  width: 100vw;
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  text-align: center;
  background-color: #fff;
}

#nav a {
  font-size: 14px;
  text-align: center;
  font-weight: bold;
  color: #2c3e50;
  width: 50px;
}

#nav a.router-link-exact-active {
  color: #c0aa95;
}
</style>
<script>
export default {
  data() {
    return {
      value: "",
      navlist: [],
    };
  },
  created() {},
  computed: {
    navFlag() {
      return this.$store.state.navFlag;
    },
  },
};
</script>